<template>
  <div>
    <h1>pinia版计数器</h1>
    <h2>{{ count }}</h2>
    <h2>{{ doubleCount }}</h2>
    <button @click="incrementSync">+</button>
  </div>
</template>

<script lang='ts' setup>
//引入
import {storeToRefs} from 'pinia'
import useCounterStore from '@/store/counterStore';
//调用
const store=useCounterStore()
const {incrementSync}=store
const {count,doubleCount}=storeToRefs(store)
console.log('count',count);


</script>

<style lang='scss' scoped>
</style>